﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage_EmpDetail.master"
    AutoEventWireup="true" CodeFile="EmpRecordSelfList.aspx.cs" Inherits="Employees_EmpRecordSelfList" %>

<%@ Register Src="../Control/DepartmentDList.ascx" TagName="DepartmentDList" TagPrefix="uc1" %>
<%@ Register Src="../Control/SelUser.ascx" TagName="SelUser" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Titile" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <infolight:webdatasource id="Master" runat="server" autoapply="True" webdatasetid="WMaster"
        datamember="ViewEmpRecord" cachedataset="True">
    </infolight:webdatasource>
    <table cellpadding="0" cellspacing="5" class="TbSearch" runat="server" id="SearchTb">
        <tr>
            <td style="width: 50px;">
                部门：
            </td>
            <td>
                <uc1:DepartmentDList ID="Depart" runat="server" />
            </td>
            <td style="width: 50px;">
                员工：
            </td>
            <td>
                <uc2:SelUser ID="SelUser" runat="server" />
            </td>
            <td style="width: 200px; margin-right: 20px; text-align: right">
                <span class="roundbtn">
                    <asp:LinkButton ID="Search" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;查&nbsp;&nbsp;询&nbsp;&nbsp;&nbsp;&nbsp;"
                        OnClick="Search_Click"></asp:LinkButton>
                </span>&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td>
                查询时间段：
            </td>
            <td>
                <asp:TextBox ID="start" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-M-d'})"
                    Width="120px" CssClass="Wdate" /></asp:TextBox> &nbsp;至&nbsp;
                <asp:TextBox ID="end" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-M-d'})"
                    Width="120px" CssClass="Wdate" /></asp:TextBox>
            </td>
            <td style="width: 50px;">
                类型：
            </td>
            <td style="width: 60px;">
                <asp:DropDownList ID="ddlType" runat="server">
                </asp:DropDownList>
            </td>
            <td style="margin-right: 20px; text-align: right">
                <span class="roundbtn">
                    <asp:LinkButton ID="Add" runat="server" Text=" 奖 惩 添 加 " OnClick="Add_Click"></asp:LinkButton>
                </span>&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="5" style="text-align:right">
              <span class="roundbtn">
                    <asp:LinkButton ID="DownLoad" runat="server" Text=" 列表数据导出 " OnClick="DownLoad_Click"></asp:LinkButton>
                </span>&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
    </table>
    <div class="tabs" runat="server" id="TabsFunction">
        <ul>
            <li>
                <asp:LinkButton ID="AddFunction" runat="server" Text="<span>奖　惩　添　加　</span>" CssClass="ChileUnHover"></asp:LinkButton>
            </li>
        </ul>
    </div>
    <infolight:webgridview id="wgvMaster" runat="server" datasourceid="Master" width="100%"
        aborticonurl="../Image/UIPics/Abort.gif" addiconurl="../Image/UIPics/Add.gif"
        applyiconurl="../Image/UIPics/Apply.gif" canceliconurl="../Image/UIPics/Cancel.gif"
        mouseoveraborticonurl="../Image/UIPics/Abort2.gif" mouseoveraddiconurl="../Image/UIPics/Add2.gif"
        mouseoverapplyiconurl="../Image/UIPics/Apply2.gif" mouseovercanceliconurl="../Image/UIPics/Cancel2.gif"
        mouseoverokiconurl="../Image/UIPics/OK2.gif" mouseoverqueryiconurl="../Image/UIPics/Query2.gif"
        okiconurl="../Image/UIPics/OK.gif" queryiconurl="../Image/UIPics/Query.gif" headerstylewrap="False"
        onrowdatabound="wgvMaster_RowDataBound" onrowcommand="wgvMaster_RowCommand" cellpadding="5"
        ondatabound="wgvMaster_DataBound">
        <navcontrols>
<InfoLight:ControlItem ControlVisible="False" Size="25" 
                MouseOverImageUrl="../image/uipics/add2.gif" ControlText="add" 
                ControlName="Add" ControlType="Image" ImageUrl="../image/uipics/add.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="False" Size="25" 
                MouseOverImageUrl="../image/uipics/ok2.gif" ControlText="Insert" 
                ControlName="OK" ControlType="Image" ImageUrl="../image/uipics/ok.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="False" Size="25" 
                MouseOverImageUrl="../image/uipics/cancel2.gif" ControlText="cancel" 
                ControlName="Cancel" ControlType="Image" ImageUrl="../image/uipics/cancel.gif"></InfoLight:ControlItem>
</navcontrols>
        <columns>
        <asp:TemplateField HeaderText="查看详细">                    
                    <itemstyle horizontalalign="Center" Width="80px" />
                    <itemtemplate>
                    <asp:ImageButton ID="imb" runat="server" ImageUrl="../Image/UIPics/Select.gif" 
                            CommandName="show" ></asp:ImageButton>
                   </itemtemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="EmpRecordID" HeaderText="记录编号" 
                    SortExpression="EmpRecordID" />
                <asp:BoundField DataField="EmployeeID" HeaderText="员工编号" 
                    SortExpression="EmployeeID" />
                <asp:BoundField DataField="EmpName" HeaderText="员工姓名" 
                    SortExpression="EmpName" />
                <asp:TemplateField HeaderText="记录分类" SortExpression="EmpRecordClass">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("EmpRecordClass") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <InfoLight:WebDropDownList ID="WebDropDownList2" runat="server" 
                            AutoInsertEmptyData="False" DataSourceID="wdsRecordType" DataTextField="Rname" 
                            DataValueField="Rid" DriverObject="" Filter="" FilterObject="" 
                            onlyshowselecttext="True" SelectedValue='<%# Bind("EmpRecordClass") %>'>
                        </InfoLight:WebDropDownList>
                    </ItemTemplate>
            </asp:TemplateField>
                <asp:TemplateField HeaderText="性别" SortExpression="Sex">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Sex") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <InfoLight:WebDropDownList ID="WebDropDownList1" runat="server" 
                            AutoInsertEmptyData="False" DataSourceID="wdsSex" DataTextField="ValueName" 
                            DataValueField="ValueId" DriverObject="" Filter="" FilterObject="" 
                            onlyshowselecttext="True" SelectedValue='<%# Bind("Sex") %>'>
                        </InfoLight:WebDropDownList>
                    </ItemTemplate>
            </asp:TemplateField>
                <asp:BoundField DataField="DepartmentName" HeaderText="所属部门" 
                    SortExpression="DepartmentName" />
                <asp:TemplateField HeaderText="记录时间" SortExpression="EmpRecordDate">
                    <EditItemTemplate>
                        <InfoLight:WebDateTimePicker ID="wdtViewEmpRecordEmpRecordDateE" runat="server" 
                            DateFormat="None" DateTimeType="DateTime" Localize="False" MaxYear="2050" 
                            MinYear="1950" Text='<%# Bind("EmpRecordDate") %>' ToolTip="EmpRecordDate" 
                            UseButtonImage="True" Width="100px"></InfoLight:WebDateTimePicker>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <InfoLight:WebDateTimePicker ID="wdtViewEmpRecordEmpRecordDateF" runat="server" 
                            DateFormat="None" DateTimeType="DateTime" Localize="False" MaxYear="2050" 
                            MinYear="1950" ToolTip="EmpRecordDate" UseButtonImage="True" Width="100px"></InfoLight:WebDateTimePicker>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lViewEmpRecordEmpRecordDate" runat="server" 
                            Text='<%# Bind("EmpRecordDate", "{0:d}") %>' ToolTip="EmpRecordDate"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
</columns>
        <rowstyle horizontalalign="Center"></rowstyle>
        <pagersettings mode="NumericFirstLast" />
        <footerstyle backcolor="#507CD1" forecolor="White" font-bold="True"></footerstyle>
        <rowstyle backcolor="#EFF3FB"></rowstyle>
        <editrowstyle backcolor="#2461BF"></editrowstyle>
        <selectedrowstyle backcolor="#D1DDF1" forecolor="#333333" font-bold="True"></selectedrowstyle>
        <pagerstyle backcolor="LightBlue" forecolor="White" horizontalalign="Center"></pagerstyle>
        <headerstyle backcolor="DeepSkyBlue" forecolor="White" font-bold="True"></headerstyle>
        <alternatingrowstyle backcolor="White" bordercolor="White"></alternatingrowstyle>
    </infolight:webgridview>
    <infolight:webdatasource id="wdsSex" runat="server" selectalias="Usasdb" selectcommand="select Employees_LinkValue.* from Employees_LinkValue
where TypeId='Sex' And ValueStatus=1" cachedataset="True">
    </infolight:webdatasource>
    <infolight:webdatasource id="wdsRecordType" runat="server" selectalias="Usasdb" selectcommand="select ValueName as Rname,ValueId as Rid from Employees_LinkValue where TypeId='EmpRecord'"
        cachedataset="True">
    </infolight:webdatasource>
</asp:Content>
